load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//tests:bazel_tests.bzl", "bazel_test")

go_test(
    name = "go_default_test",
    size = "small",
    srcs = ["cgo_test.go"],
    embed = [":go_default_library"],
    tags = ["manual"],
)

go_library(
    name = "go_default_library",
    srcs = [
        "cgo.go",
        "foo.c",
    ],
    cgo = True,
    importpath = "github.com/bazelbuild/rules_go/tests/cgo_library_root_dir",
    tags = ["manual"],
)

bazel_test(
    name = "cgo_library_root_dir",
    command = "test",
    targets = [":go_default_test"],
)
